CREATE TABLE [dbo].[TTENTR_REND]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_ENTR_REND] [dbo].[TD_VC_003] NOT NULL,
[DE_ENTR_REND] [dbo].[TD_VC_100] NOT NULL,
[CO_CNTA_CNTB] [dbo].[TD_VC_020] NULL,
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTENTR_RE__CO_US__5E7FE7D2] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTENTR_RE__FE_US__5F740C0B] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTENTR_RE__CO_US__60683044] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTENTR_RE__FE_US__615C547D] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTENTR_REND] ADD CONSTRAINT [PK__TTENTR_R__D1E398E134949AFE] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_ENTR_REND]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTENTR_REND] ADD CONSTRAINT [FK__TTENTR_RE__CO_EM__5927012F] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
